<?php
global $_RQ,$_AR;
$_RQ['op']=$_RQ['op']?$_RQ['op']:'edit';
$return=array();
if($_RQ['op']=='edit'){
	if($_RQ['postdata']){
		$postdata=get_postdata();
		pdo_update('core_accounts',array('syscolor'=>$postdata['syscolor']),array('uniacid'=>$_SESSION['uniacid']));
		$this->plugin_setting('setting',$postdata);
		exi('设置成功');
	}
	$item=$this->plugin_setting('setting');
	$plugins = $this->plugins();
	$hdps =array(
		array('title'=>'首页','picurl'=>'../addons/jy_weishop/resource/images/mobile-hdp01.jpg','action'=>'index/'),
		array('title'=>'全部','picurl'=>'../addons/jy_weishop/resource/images/mobile-hdp02.jpg','action'=>'allplugins/'),
	);
	$item['hdps'] = !empty($item['hdps']) ? $item['hdps'] : $hdps;
	$cube =array(
		array('title'=>'首页','image'=>'../core/resource/images/diy/default/cube-1.jpg','action'=>'index/'),
		array('title'=>'全部','image'=>'../core/resource/images/diy/default/cube-2.jpg','action'=>'allplugins/'),
		array('title'=>'订单','image'=>'../core/resource/images/diy/default/cube-3.jpg','action'=>'jy_weishop/order.list/'),
		array('title'=>'我的','image'=>'../core/resource/images/diy/default/cube-4.jpg','action'=>'jy_weishop/member.index/'),
	);
	$item['cube'] = !empty($item['cube']) ? $item['cube'] : $cube;
	$bankuai1 =array(
		array('title'=>'新品上线','img'=>'../addons/jy_weishop/resource/images/new_icon.png','action'=>'jy_weishop/activity//order=new'),
		array('title'=>'今日特价','img'=>'../addons/jy_weishop/resource/images/tejia.png','action'=>'jy_weishop/activity//order=sale_offer'),
		array('title'=>'今日秒杀','img'=>'../addons/jy_weishop/resource/images/miaosha.png','action'=>'jy_seckill/index/'),
		array('title'=>'整点预售','img'=>'../addons/jy_weishop/resource/images/yushou.png','action'=>'jy_yushou/index/'),
		array('title'=>'限时预售','img'=>'../addons/jy_weishop/resource/images/yushou2.png','action'=>'jy_weishop/activity//order=sale_presell'),
		array('title'=>'限时促销','img'=>'../addons/jy_weishop/resource/images/cuxiao.png','action'=>'jy_weishop/activity//order=sale_cuxiao'),
		array('title'=>'限时卖','img'=>'../addons/jy_weishop/resource/images/xianshi.png','action'=>'jy_weishop/activity//order=sale_limit'),
		array('title'=>'超值拼团','img'=>'../core/resource/images/diy/icon/icon-ping.png','action'=>'jy_aligroup/index/'),
		array('title'=>'助力砍价','img'=>'../core/resource/images/diy/icon/icon-kanjia.png','action'=>'jy_bargain/index/'),
		array('title'=>'购物直播','img'=>'../core/resource/images/diy/icon/icon-live.png','action'=>'jy_weishoplive/index/'),
		array('title'=>'新人专享','img'=>'../addons/jy_weishop/resource/images/sale_new.png','action'=>'jy_weishop/activity//order=sale_new'),
	);
	$bankuai2 =array(
		array('title'=>'每日清仓','img'=>'../addons/jy_weishop/resource/mobile/images/icon/qingcang.png','action'=>'jy_weishop/index/'),
		array('title'=>'品牌馆','img'=>'../addons/jy_weishop/resource/mobile/images/icon/pinpai.png','action'=>'jy_weishop/index/'),
		array('title'=>'9块9特卖','img'=>'../addons/jy_weishop/resource/mobile/images/icon/9.9.png','action'=>'jy_weishop/index/'),
		array('title'=>'找折扣','img'=>'../addons/jy_weishop/resource/mobile/images/icon/zhekou.png','action'=>'jy_weishop/index/'),
		array('title'=>'时尚穿搭','img'=>'../addons/jy_weishop/resource/mobile/images/icon/shishang.png','action'=>'jy_weishop/index/'),
		array('title'=>'爱逛街','img'=>'../addons/jy_weishop/resource/mobile/images/icon/guangjie.png','action'=>'jy_weishop/index/'),
		array('title'=>'食品超市','img'=>'../addons/jy_weishop/resource/mobile/images/icon/shopping.png','action'=>'jy_weishop/index/'),
		array('title'=>'电器城','img'=>'../addons/jy_weishop/resource/mobile/images/icon/jiadian.png','action'=>'jy_weishop/index/'),
		array('title'=>'领券中心','img'=>'../addons/jy_weishop/resource/mobile/images/icon/coupon.png','action'=>'jy_weishop/coupon.index/'),
		array('title'=>'全部分类','img'=>'../addons/jy_weishop/resource/mobile/images/icon/cate.png','action'=>'jy_weishop/allplugins/'),
	);
	$item['bankuai1'] = !empty($item['bankuai1']) ? $item['bankuai1'] : $bankuai1;
	$item['demobankuai1'] = $bankuai1;
	$item['bankuai2'] = !empty($item['bankuai2']) ? $item['bankuai2'] : $bankuai2;
	$pluginsactions=$this->pluginsactions();
	$item['pluginsactions_title0']=$item['pluginsactions_title0']?:$pluginsactions[0]['title'];
	$item['pluginsactions_list0']=$item['pluginsactions_list0']?:$pluginsactions[0]['list'];
	$item['pluginsactions_title1']=$item['pluginsactions_title1']?:$pluginsactions[1]['title'];
	$item['pluginsactions_list1']=$item['pluginsactions_list1']?:$pluginsactions[1]['list'];
	$item['pluginsactions_title2']=$item['pluginsactions_title2']?:$pluginsactions[2]['title'];
	$item['pluginsactions_list2']=$item['pluginsactions_list2']?:$pluginsactions[2]['list'];
	$item['pluginsactions'] = $pluginsactions;
	$pluginnav=array();
	foreach($pluginsactions as $type){
		foreach($type['list'] as &$p){
				$pluginnav[]=$p;
		}
	}
	$pluginnav=array_reverse($pluginnav);
	$pluginnav[]=array('title'=>'全部分类','img'=>'../core/resource/images/diy/icon/icon-1.png','action'=>'jy_weishop/allplugins/');
	$item['pluginnav'] = !empty($item['pluginnav']) ? $item['pluginnav'] : $pluginnav;
	$my_days = array(
			array('title'=>'我的优惠券','icon'=>'icon-youhuiquan','color'=>'#cc99ff','action'=>'jy_weishop/coupon.myindex/'),
			array('title'=>'微信会员卡','icon'=>'icon-daifahuo','color'=>'#cc99ff','action'=>'core/member.wxcard/main/'),
			array('title'=>'余额提现','icon'=>'icon-dixiaofei','color'=>'#cc99ff','action'=>'core/member.tixian/'),
			array('title'=>'地址管理','icon'=>'icon-position','color'=>'#cc99ff','action'=>'core/member.address/'),
			array('title'=>'帮助中心','icon'=>'icon-help','color'=>'#cc99ff','action'=>'jy_weishop/news.list/'),
			array('title'=>'获得购物卡','icon'=>'icon-qiangdan','color'=>'#cc99ff','action'=>'jy_weishop/member.getcard/'),
			array('title'=>'我的购物车','icon'=>'icon-gouwuche','color'=>'#cc99ff','action'=>'jy_weishop/member.cart/'),
			array('title'=>'我的购物卡','icon'=>'icon-pingzhengzhongxin','color'=>'#cc99ff','action'=>'jy_weishop/member.mycard/'),
			array('title'=>'我的关注','icon'=>'icon-woguanzhudepinpai','color'=>'#cc99ff','action'=>'jy_weishop/member.favorite/'),
			array('title'=>'我的足迹','icon'=>'icon-zuji','color'=>'#cc99ff','action'=>'jy_weishop/member.history/'),
	);
	$item['my_days'] = !empty($item['my_days']) ? $item['my_days'] : $my_days;
	$item['demomy_days'] = $my_days;
	$my_logs = array(
			array('title'=>'积分日志','icon'=>'icon-jifen','color'=>'#cc99ff','action'=>'core/member.credit_log/'),
			array('title'=>'余额日志','icon'=>'icon-jiangjiatongzhi','color'=>'#cc99ff','action'=>'core/member.credit_log/'),
			array('title'=>'提现日志','icon'=>'icon-trade','color'=>'#cc99ff','action'=>'core/member.cash_log/'),
			array('title'=>'红包日志','icon'=>'icon-ai-hongbao','color'=>'#cc99ff','action'=>'core/member.red_log/'),
	);
	$item['my_logs'] = !empty($item['my_logs']) ? $item['my_logs'] : $my_logs;
	$item['demomy_logs'] = $my_logs;
	$my_memberbtn = array(
			array('title'=>'小程序直播','icon'=>'icon-video','color'=>'#cc99ff','action'=>'jy_weishop/sale.live_index/'),
			array('title'=>'领取优惠券','icon'=>'icon-youhuiquan1','color'=>'#cc99ff','action'=>'jy_weishop/coupon.index/'),
			array('title'=>'领取微信会员卡','icon'=>'icon-huiyuanqia','color'=>'#cc99ff','action'=>'core/member.wxcard/main'),
			array('title'=>'积分排行','icon'=>'icon-paixing','color'=>'#cc99ff','action'=>'jy_weishop/member.rank/'),
	);
	$install = check_account_permission('jy_commission');
	if($install && $_SESSION['current_plugin'] !='jy_friends_shop'){
		$fenxiaoset=plugin('jy_commission')->plugin_setting('page_setting');
		$my_memberbtn[]=array('action'=>'jy_commission/index/','title'=>$fenxiaoset['tcenter']?:'我的分销','icon'=>'icon-paihao0','remark'=>'');
	}
	$install = check_account_permission('jy_merch');
	if($install && $_SESSION['current_plugin'] !='jy_friends_shop'){
		$my_memberbtn[]=array('action'=>'jy_merch/manage.index/','title'=>'商户入口','icon'=>'icon-dianpu','remark'=>'');
	}
	$install = check_account_permission('jy_giftbao');
	if($install && $_SESSION['current_plugin'] !='jy_friends_shop'){
		$my_memberbtn[]=array('action'=>'jy_weishop/sale.mylibao/','title'=>'我的礼包','icon'=>'icon-gifts','remark'=>'');
	}
	$item['my_memberbtn'] = !empty($item['my_memberbtn']) ? $item['my_memberbtn'] : $my_memberbtn;
	$item['demomy_memberbtn'] = $my_memberbtn;
	$footernav = array(
			array('title'=>'首页','icon'=>'icon-shouye','color'=>'#cc99ff','action'=>'jy_weishop/index/','image'=>'../addons/jy_weishop/resource/images/jy_weishoparticle.png'),
			array('title'=>'推荐','icon'=>'icon-viewlist','color'=>'#66cc99','action'=>'jy_weishop/goods.index/','image'=>'../addons/jy_weishop/resource/images/jy_fenleimsg.png'),
			array('title'=>'搜索','icon'=>'icon-compass','color'=>'#ff9933','action'=>'jy_weishop/shop.groups/','image'=>'../addons/jy_weishop/resource/images/jy_fenleimsg.png'),
			array('title'=>'订单','icon'=>'icon-manageorder','color'=>'#66cc66','action'=>'jy_weishop/order.list/','image'=>'../addons/jy_weishop/resource/images/jy_fenleimsg.png'),
			array('title'=>'我的','icon'=>'icon-wo1','color'=>'#FF83FA','action'=>'jy_weishop/member.index/','image'=>'../addons/jy_weishop/resource/images/jy_fenleimsg.png'),
	);
	$item['footernav'] = !empty($item['footernav']) ? $item['footernav'] : $footernav;
	$welcomehdps =array(
					array('title'=>'他们都在用H5微商城','desc'=>'解决开店问题 助力小程序/H5/PC商城一体化','picurl'=>'../core/resource/images/welcomehdp01.jpg'),
					array('title'=>'粉丝变渠道商 激活圈内用户','desc'=>'分销加盟模式，让运营成为一种享受','picurl'=>'../core/resource/images/welcomehdp02.jpg'),
					array('title'=>'各种运营场景体 供你选择','desc'=>'根据自己的运营场景，个性组合搭建','picurl'=>'../core/resource/images/welcomehdp03.jpg'),
					array('title'=>'海量个性营销功能 助力市场激活','desc'=>'活跃，激活，促交面面俱到 让营销不在乏味','picurl'=>'../core/resource/images/welcomehdp04.jpg'),
	);
	$item['welcomehdps'] = !empty($item['welcomehdps']) ? $item['welcomehdps'] : $welcomehdps;
	$item['index_tpl']=$item['index_tpl']?:'0';
	$item['syscolor']=pdo_getcolumn('core_accounts',array('uniacid'=>$_SESSION['uniacid']),'syscolor');
    $return['item']=$item;
	$return['item']['plugins']=$return['item']['plugins']?$return['item']['plugins']:$plugins[1]['list'];
	$return['status']=array('1'=>'开启','0'=>'关闭');
	$htmls=array(
		'type'=>'edit',
		'desc'=>'设置',
		'edit_tab'=>true,
		'edits'=>array(
				array(
					'title'=>'分享设置',
					'list'=>array(
						array('type'=>'string','title'=>'分享标题','name'=>'share_title'),
						array('type'=>'image','title'=>'分享图片','name'=>'share_image'),
						array('type'=>'text','title'=>'分享描述','name'=>'share_desc'),
					)
				),
				array(
					'title'=>'首页风格',
					'list'=>array(
						array('type'=>'tip','title'=>'【温馨提示】：默认是新风格模式，可以自由切换成老的风格！'),
						array('type'=>'image','title'=>'首页顶部LOGO','name'=>'toplogo'),
						array('type'=>'radio_tpl','title'=>'首页风格','name'=>'index_tpl','options'=>'index_tpls'),
						array('type'=>'choose_many','name'=>'newvideogoods','title'=>'首页新品视频商品','action'=>'/goods.get_goods/many/isvideo=1','choose_title'=>'选择带视频的商品'),
					)
				),
				array(
					'title'=>'界面UI配色',
					'list'=>array(
						array('type'=>'color_pool','title'=>'选择配色方案','name'=>'syscolor','help'=>''),
						array('type'=>'colorpicker','title'=>'站点颜色','name'=>'syscolor','help'=>'自定义系统颜色系，默认： #18bc9c'),
						array('type'=>'phone_tpl','name'=>'syscolor'),
					)
				),
				array(
					'title'=>'幻灯片',
					'list'=>array(
						array('type'=>'array','name'=>'hdps','add_tip'=>'添加一个幻灯片',
								'list'=>array(
									array('type'=>'image','name'=>'picurl','title'=>'图片'),	
									array('type'=>'string','name'=>'url','title'=>'地址'),
								),
								'details'=>array(
									array('type'=>'image','name'=>'picurl','title'=>'图片','help'=>'推荐尺寸：750*240'),
									array('type'=>'link','name'=>'url','from'=>'action','title'=>'地址'),
								)
						),
					)
				),
				array(
					'title'=>'欢迎幻灯片',
					'list'=>array(
								array('type'=>'switch','title'=>'开启欢迎页面','name'=>'iswelcome','help'=>'开启后，访问首页会先进入欢迎页面！'),
								array('type'=>'array','title'=>'欢迎幻灯片','name'=>'welcomehdps','add_tip'=>'添加一个欢迎幻灯片',
										'list'=>array(
											array('type'=>'string','name'=>'title','title'=>'标题'),
											array('type'=>'image','name'=>'picurl','title'=>'图片'),
											array('type'=>'string','name'=>'url','title'=>'地址'),
										),
										'details'=>array(
											array('type'=>'string','name'=>'title','title'=>'标题'),
											array('type'=>'string','name'=>'desc','title'=>'描述'),
											array('type'=>'image','name'=>'picurl','title'=>'图片','help'=>'推荐尺寸：750*900'),
											array('type'=>'link','name'=>'url','from'=>'action','title'=>'地址'),
										)
								),
					)
				),
				array(
							'title'=>'轮播导航',
							'list'=>array(
									array('type'=>'array','name'=>'pluginnav','add_tip'=>'添加一个轮播导航',
									'list'=>array(
										array('type'=>'string','name'=>'title','title'=>'导航名称'),
										array('type'=>'image','name'=>'img','title'=>'导航图片'),
										array('type'=>'string','name'=>'action','title'=>'导航链接'),							
									),
									'details'=>array(
										array('type'=>'string','name'=>'title','title'=>'导航名称'),
										array('type'=>'image','name'=>'img','title'=>'导航图片'),							
										array('type'=>'link','name'=>'action','from'=>'action','title'=>'导航链接'),
									)
								),
							)
				),
				array(
							'title'=>'板块导航1',
							'list'=>array(
									array('type'=>'updemo','name'=>'bankuai1','demo'=>'demobankuai1','title'=>'重置导航','help'=>'不知道添加什么导航？重置默认的一下试试！'),
									array('type'=>'array','name'=>'bankuai1','add_tip'=>'添加一个板块导航',
									'list'=>array(
										array('type'=>'string','name'=>'title','title'=>'导航名称'),
										array('type'=>'image','name'=>'img','title'=>'导航图片'),
										array('type'=>'string','name'=>'action','title'=>'导航链接'),							
									),
									'details'=>array(
										array('type'=>'string','name'=>'title','title'=>'导航名称'),
										array('type'=>'image','name'=>'img','title'=>'导航图片'),							
										array('type'=>'link','name'=>'action','from'=>'action','title'=>'导航链接'),
									)
								),
							)
				),
				/*array(
							'title'=>'板块导航2',
							'list'=>array(
									array('type'=>'array','name'=>'bankuai2','add_tip'=>'添加一个板块导航',
									'list'=>array(
										array('type'=>'string','name'=>'title','title'=>'导航名称'),
										array('type'=>'image','name'=>'img','title'=>'导航icon'),
										//array('type'=>'color','name'=>'color','title'=>'导航颜色'),
										array('type'=>'string','name'=>'action','title'=>'导航链接'),
										//array('type'=>'radio','name'=>'is_install','title'=>'是否显示','options'=>'is_installs'),								
									),
									'details'=>array(
										array('type'=>'string','name'=>'title','title'=>'导航名称'),
										array('type'=>'image','name'=>'img','title'=>'导航icon'),
										//array('type'=>'color','name'=>'color','title'=>'导航颜色'),										
										array('type'=>'link','name'=>'action','from'=>'action','title'=>'导航链接'),
										//array('type'=>'switch','name'=>'is_install','title'=>'是否显示'),
									)
								),
							)
				),*/
				array(
							'title'=>'底部导航',
							'list'=>array(
								array('type'=>'array','name'=>'footernav','add_tip'=>'添加一个底部导航',
									'list'=>array(
										array('type'=>'string','name'=>'title','title'=>'导航名称'),
										array('type'=>'icon','name'=>'icon','from'=>'jinyunicon','title'=>'导航图标'),
										array('type'=>'string','name'=>'action','title'=>'导航链接'),
									),
									'details'=>array(
										array('type'=>'string','name'=>'title','title'=>'导航名称'),
										array('type'=>'icon','name'=>'icon','from'=>'jinyunicon','title'=>'导航图标'),
										array('type'=>'link','name'=>'action','from'=>'action','title'=>'导航链接'),
									)
								),
							)
				),
				array(
					'title'=>'魔方设置',
					'list'=>array(
						array('type'=>'array','name'=>'cube','add_tip'=>'添加一个魔方',
								'list'=>array(
									array('type'=>'image','name'=>'image','title'=>'图片'),	
									array('type'=>'string','name'=>'url','title'=>'链接'),
								),
								'details'=>array(
									array('type'=>'image','name'=>'image','title'=>'图片'),
									array('type'=>'link','name'=>'url','from'=>'action','title'=>'链接'),
								)
						),
					)
				),
				array(
					'title'=>'页面开关设置',
					'list'=>array(
						array('type'=>'switch','title'=>'关闭漂浮客服按钮','name'=>'nokefu','help'=>'这里将全局显示客服按钮（浮动页面右下角），客服指向设置：移步--设置--基础设置--联系我们（H5端客服类型，小程序端客服类型）'),
						array('type'=>'switch','title'=>'关闭顶部搜索','name'=>'issearch'),
						array('type'=>'switch','title'=>'关闭幻灯片','name'=>'ishdps'),
						array('type'=>'switch','title'=>'关闭公告栏','name'=>'isnotice'),
						array('type'=>'switch','title'=>'关闭轮播导航','name'=>'isswiper'),
						array('type'=>'switch','title'=>'关闭板块导航1','name'=>'isbankuai1'),
						array('type'=>'switch','title'=>'关闭分类板块','name'=>'groups'),
						array('type'=>'switch','title'=>'关闭魔方','name'=>'iscube'),
						//array('type'=>'switch','title'=>'关闭底部菜单','name'=>'isfooternav'),
						//array('type'=>'switch','title'=>'关闭分享','name'=>'isshare'),
						array('type'=>'switch','title'=>'关闭未支付弹窗','name'=>'no_ordermodal'),
						array('type'=>'switch','title'=>'关闭弹幕','name'=>'no_tanmu'),
						array('type'=>'switch','title'=>'关闭直播？','name'=>'islivebankuai'),
						array('type'=>'switch','title'=>'关闭每日上新？','name'=>'isnewgoods'),
						array('type'=>'switch','title'=>'关闭客户喜欢','name'=>'islikegoods'),
						array('type'=>'switch','title'=>'关闭店长推荐','name'=>'isrecommand'),
					)
				),
				array(
					'title'=>'会员中心页面开关设置',
					'list'=>array(
						array('type'=>'tip','title'=>'如需DIY会员中心页面：移步DIY装修--添加页面--页面类型--选择会员中心'),
						array('type'=>'switch','title'=>'关闭我的订单','name'=>'no_order'),
						array('type'=>'switch','title'=>'关闭待激活商品','name'=>'no_verify'),
						array('type'=>'switch','title'=>'关闭我的日常','name'=>'no_days'),
						array('type'=>'switch','title'=>'关闭售后客服','name'=>'no_shkefu'),
						array('type'=>'updemo','name'=>'my_days','demo'=>'demomy_days','title'=>'重置我的日常','help'=>'不知道添加什么我的日常？重置默认的一下试试！'),
						array('type'=>'array','title'=>'我的日常','name'=>'my_days','add_tip'=>'添加一个我的日常',
									'list'=>array(
										array('type'=>'string','name'=>'title','title'=>'日常名称'),
										array('type'=>'icon','name'=>'icon','from'=>'jinyunicon','title'=>'日常图标'),
										array('type'=>'string','name'=>'action','title'=>'日常链接'),
									),
									'details'=>array(
										array('type'=>'string','name'=>'title','title'=>'日常名称'),
										array('type'=>'icon','name'=>'icon','from'=>'jinyunicon','title'=>'日常图标'),
										array('type'=>'link','name'=>'action','from'=>'action','title'=>'日常链接'),
									)
						),
						array('type'=>'switch','title'=>'关闭我的记录','name'=>'no_logs'),
						array('type'=>'updemo','name'=>'my_logs','demo'=>'demomy_logs','title'=>'重置我的记录','help'=>'不知道添加什么我的记录？重置默认的一下试试！'),
						array('type'=>'array','title'=>'我的记录','name'=>'my_logs','add_tip'=>'添加一个我的记录',
									'list'=>array(
										array('type'=>'string','name'=>'title','title'=>'记录名称'),
										array('type'=>'icon','name'=>'icon','from'=>'jinyunicon','title'=>'记录图标'),
										array('type'=>'string','name'=>'action','title'=>'记录链接'),
									),
									'details'=>array(
										array('type'=>'string','name'=>'title','title'=>'记录名称'),
										array('type'=>'icon','name'=>'icon','from'=>'jinyunicon','title'=>'记录图标'),
										array('type'=>'link','name'=>'action','from'=>'action','title'=>'记录链接'),
									)
						),
						array('type'=>'tip','title'=>'其他导航列表'),
						array('type'=>'switch','title'=>'关闭其他导航','name'=>'no_others'),
						array('type'=>'updemo','name'=>'my_memberbtn','demo'=>'demomy_memberbtn','title'=>'重置导航','help'=>'不知道添加什么导航？重置默认的一下试试！'),
						array('type'=>'array','title'=>'其他导航','name'=>'my_memberbtn','add_tip'=>'添加一个导航按钮',
									'list'=>array(
										array('type'=>'string','name'=>'title','title'=>'导航名称'),
										array('type'=>'icon','name'=>'icon','from'=>'jinyunicon','title'=>'导航图标'),
										array('type'=>'string','name'=>'action','title'=>'导航链接'),
									),
									'details'=>array(
										array('type'=>'string','name'=>'title','title'=>'导航名称'),
										array('type'=>'icon','name'=>'icon','from'=>'jinyunicon','title'=>'导航图标'),
										array('type'=>'link','name'=>'action','from'=>'action','title'=>'导航链接'),
									)
						),
					)
				),
				array(
				'title'=>'全部分类设置',
					'list'=>array(
								array('type'=>'ewm','name'=>'allpluginsurl','title'=>'全部分类入口'),
								array('type'=>'string','name'=>'pluginsactions_title0','title'=>'特色购物重命名'),
								array('type'=>'array','title'=>'特色购物','name'=>'pluginsactions_list0','add_tip'=>'添加一个特色购物',
									'list'=>array(
										array('type'=>'string','name'=>'title','title'=>'名称'),
										array('type'=>'icon','from'=>'jinyunicon','name'=>'icon','title'=>'图标'),
										array('type'=>'string','name'=>'action','title'=>'路径'),							
									),
									'details'=>array(
										array('type'=>'string','name'=>'title','title'=>'名称'),
										array('type'=>'icon','from'=>'jinyunicon','name'=>'icon','title'=>'图标'),
										array('type'=>'link','from'=>'action','name'=>'action','title'=>'路径'),
									)
								),
								array('type'=>'string','name'=>'pluginsactions_title1','title'=>'活动购物重命名'),
								array('type'=>'array','title'=>'活动购物','name'=>'pluginsactions_list1','add_tip'=>'添加一个特色购物',
									'list'=>array(
										array('type'=>'string','name'=>'title','title'=>'名称'),
										array('type'=>'icon','from'=>'jinyunicon','name'=>'icon','title'=>'图标'),
										array('type'=>'string','name'=>'action','title'=>'路径'),							
									),
									'details'=>array(
										array('type'=>'string','name'=>'title','title'=>'名称'),
										array('type'=>'icon','from'=>'jinyunicon','name'=>'icon','title'=>'图标'),
										array('type'=>'link','from'=>'action','name'=>'action','title'=>'路径'),
									)
								),
								array('type'=>'string','name'=>'pluginsactions_title2','title'=>'我的日常重命名'),
								array('type'=>'array','title'=>'我的日常','name'=>'pluginsactions_list2','add_tip'=>'添加一个特色购物',
									'list'=>array(
										array('type'=>'string','name'=>'title','title'=>'名称'),
										array('type'=>'icon','from'=>'jinyunicon','name'=>'icon','title'=>'图标'),
										array('type'=>'string','name'=>'action','title'=>'路径'),							
									),
									'details'=>array(
										array('type'=>'string','name'=>'title','title'=>'名称'),
										array('type'=>'icon','from'=>'jinyunicon','name'=>'icon','title'=>'图标'),
										array('type'=>'link','from'=>'action','name'=>'action','title'=>'路径'),
									)
								),
					)
				),
			)
	);
	$return['item']['allpluginsurl']=custom_url('jy_weishop/allplugins/',true);
	$return['htmls']=$htmls;
	$return['is_installs']=array('0'=>'不显示','1'=>'显示');
	$return['index_tpls']=array(
		array('id'=>0,'title'=>'A2风格','image'=>'../addons/jy_weishop/resource/images/tpl00.png'),
		array('id'=>1,'title'=>'A1风格','image'=>'../addons/jy_weishop/resource/images/tpl01.png'),
	);
	exi($return);
}
if($_RQ['op']=='chooseplugins'){
	$list = pdo_getall('core_plugins',array('hide'=>0),array('id','style','name','title','image','description'),'id');
	if($list){
		foreach($list as $k=>&$item){
			if(!check_permission($item['name'])){
				unset($list[$k]);
			}else{
				$item['plugininfo'] = array('name'=>$item['name'],'title'=>$item['title'],'description'=>$item['description']);
			}
			
		}
	}
	$return['list']=$list;
	$return['htmls']=array(
		'type'=>'list',
		'list'=>array('data'=>'list','edit'=>false,'delall'=>false,'del_one'=>false,'pagelist'=>false,'list'=>array(
			array('name'=>'title','title'=>'名称','type'=>'string'),
		),'action'=>array(
			array('type'=>'modal_result','name'=>'name','title'=>'选取'),
		)),
		'search_one'=>array('name'=>'title','add'=>false),
	);
	exi($return);
}
?>